project(MFUI)
cmake_minimum_required(VERSION 3.25)
set(CMAKE_BUILD_TYPE Debug)
if(WIN32)
	if (${CMAKE_SIZEOF_VOID_P} MATCHES 8)
		set(SDL2_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/x64/lib/SDL2.a;${CMAKE_CURRENT_LIST_DIR}/x64/lib/SDL2main.a;${CMAKE_CURRENT_LIST_DIR}/x64/lib/SDL2_ttf.a;${CMAKE_CURRENT_LIST_DIR}/x64/lib/SDL2_image.a")
	else ()
		set(SDL2_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/x86/lib/SDL2.a;${CMAKE_CURRENT_LIST_DIR}/x86/lib/SDL2main.a;${CMAKE_CURRENT_LIST_DIR}/x86/lib/SDL2_ttf.a;${CMAKE_CURRENT_LIST_DIR}/x86/lib/SDL2_image.a")
	endif()
else()
	find_package(SDL2 REQUIRED)
	find_package(SDL2_ttf REQUIRED)
endif()
add_library(MFUI core.cpp progressbar.cpp checkbutton.cpp radiobutton.cpp layout.cpp listlayout.cpp button.cpp texturebutton.cpp drawnode.cpp canvas.cpp textbutton.cpp texturerect.cpp textutil.cpp textedit.cpp label.cpp)
add_executable(test main.cpp)
add_compile_options(-static)
if(WIN32)
	target_link_libraries(test MFUI SDL2Main.a SDL2 SDL2_ttf SDL2_image)
else()
	target_link_libraries(test MFUI SDL2 SDL2_ttf SDL2_image)
endif()